<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<!--
Not automatically generated, has been changed:
$Id: corefilters.htm,v 1.2 2005/10/03 16:49:04 macpaille Exp $ 
-->
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Keywords" content="Avisynth 2 Filter Reference">
   <meta name="Description" content="Avisynth filter reference">
   <title>Avisynth 2 Filter Reference</title>
<link rel="stylesheet" type="text/css" href="../avisynth.css">
</head>
<body>

<h2>
<a NAME="producing"></a>Source filters for producing a clip</h2>

<table BORDER="1" CELLSPACING=0 CELLPADDING=4 WIDTH="90%" >
<caption></caption>
<tbody></tbody>

<tr>
<td WIDTH="30%"><a href="corefilters/avisource.htm">AVISource / OpenDMLSource /
  AVIFileSource / WAVSource</a></td>

<td WIDTH="70%">AVISource takes as argument one or more file name in quotes
and opens the file.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/directshowsource.htm">DirectShowSource</a></td>

<td WIDTH="70%">DirectShowSource reads filename using DirectShow</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/segmentedsource.htm">SegmentedAVISource
/ SegmentedDirectShowSource</a></td>

<td WIDTH="70%">The SegmentedAVISource filter automatically loads up to
100 avi files per argument</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/blankclip.htm">BlankClip / Blackness</a></td>

<td WIDTH="70%">The BlankClip filter produces a solid color, silent video
clip of the specified length (in frames).</td>
</tr>

<tr>
<td><a href="corefilters/imagesource.htm">ImageReader / ImageSource</a></td>

<td>This filter produces a video clip by reading in still images.&nbsp;</td>
</tr>

<tr>
<td><a href="corefilters/import.htm">Import</a></td>

<td>Import an AviSynth script into the current script</td>
</tr>
</table>

<h2> <a NAME="processing"></a>Filters for image processing</h2>

<table BORDER="1" CELLSPACING=0 CELLPADDING=4 WIDTH="90%" >
<caption></caption>
<tbody></tbody>

<tr>
<td WIDTH="30%"><a href="corefilters/addborders.htm">AddBorders</a></td>

<td WIDTH="70%">AddBorders adds black borders around the image.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/blur.htm">Blur / Sharpen</a></td>

<td WIDTH="70%">These are simple 3x3-kernel blurring and sharpening filters.</td>
</tr>

<tr>
<td><a href="corefilters/coloryuv.htm">ColorYUV</a></td>

<td>Adjusts colors and luma independently.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/convert.htm">ConvertToRGB / ConvertToYUY2
/ ConvertToYV12 / ConvertBackToYUY2 ConvertToRGB32 / ConvertToRGB24</a></td>

<td WIDTH="70%">AviSynth can deal internally with four color formats, RGB24,
RGB32, YUY2 and YV12. These filters convert between them.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/crop.htm">Crop / CropBottom</a></td>

<td WIDTH="70%">Crop crops excess pixels off of each frame.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/convolution.htm">GeneralConvolution</a></td>

<td WIDTH="70%">General 3x3 or 5x5 convolution matrix.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/greyscale.htm">Greyscale</a></td>

<td WIDTH="70%">Converts a video to greyscale.</td>
</tr>

<tr>
<td><a href="corefilters/invert.htm">Invert</a></td>

<td>Inverts selected color channels of a video.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/layer.htm">Layer / Mask / ResetMask /
ColorKeyMask</a></td>

<td WIDTH="70%">Layering two videos.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/letterbox.htm">Letterbox</a></td>

<td WIDTH="70%">Letterbox simply blackens out the top and the bottom and
optionally left and right side of each frame.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/levels.htm">Levels</a></td>

<td WIDTH="70%">The Levels filter scales and clamps the blacklevel and whitelevel and adjusts the gamma.</td>
</tr>

<tr>
<td><a href="corefilters/limiter.htm">Limiter</a></td>

<td>A filter for clipping levels to within CCIR-601 range.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/overlay.htm">Overlay</a></td>

<td WIDTH="70%">Overlay puts two clips on top of each other with an optional
  displacement of the overlaying image, and using different overlay methods.
  Furthermore opacity can be adjusted for the overlay clip.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/mergergb.htm">MergeARGB / MergeRGB</a></td>

<td WIDTH="70%">This filter makes it possible to select and combine a color
channel from each of the input videoclips.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/merge.htm">Merge / MergeChroma / MergeLuma</a></td>

<td WIDTH="70%">This filter makes it possible to merge luma, chroma or both from
a videoclip into another. There is an optional weighing, so a percentage
between the two clips can be specified.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/reduceby2.htm">ReduceBy2 / HorizontalReduceBy2
/ VerticalReduceBy2</a></td>

<td WIDTH="70%">ReduceBy2 reduces the size of each frame by half.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/resize.htm">BilinearResize / BicubicResize
/ LanczosResize / Lanczos4Resize / PointResize</a></td>

<td WIDTH="70%">The Resize filters rescale the input video frames to an
arbitrary new resolution, using different sampling algorithms.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/adjust.htm">RGBAdjust</a></td>

<td WIDTH="70%">Adjust each color channel seperately.</td>
</tr>

<tr>
<td><a href="corefilters/showalpha.htm">ShowAlpha / ShowRed / ShowGreen / ShowBlue</a></td>

<td>Shows the selected channel of an (A)RGB clip.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/soften.htm">SpatialSoften / TemporalSoften</a></td>

<td WIDTH="70%">The SpatialSoften and TemporalSoften filters remove noise
from a video clip by selectively blending pixels.</td>
</tr>

<tr>
<td><a href="corefilters/swap.htm">SwapUV / UToY / VToY / YToUV</a></td>

<td>Swaps/copies chroma channels of a clip.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/Tweak.htm">Tweak</a></td>

<td WIDTH="70%">Adjust the hue, saturation, brightness, and contrast.</td>
</tr>
</table>

<h2>
<a NAME="editing"></a>Filters for Editing</h2>

<table BORDER CELLSPACING=0 CELLPADDING=4 WIDTH="90%" style="" >
<caption></caption>
<tbody></tbody>

<tr>
<td WIDTH="30%"><a href="corefilters/splice.htm">AlignedSplice / UnalignedSplice</a></td>

<td WIDTH="70%">AlignedSplice and UnalignedSplice join two or more video
clips end to end.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/fps.htm">AssumeFPS / ChangeFPS / ConvertFPS</a></td>

<td WIDTH="70%">Changes framerates in different ways.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/deleteframe.htm">DeleteFrame</a></td>

<td WIDTH="70%">DeleteFrame deletes a single frame, given as an argument.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/dissolve.htm">Dissolve</a></td>

<td WIDTH="70%">Dissolve is like AlignedSplice, except that the clips are
combined with some overlap.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/duplicateframe.htm">DuplicateFrame</a></td>

<td WIDTH="70%">DuplicateFrame duplicates a single frame given as an argument.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/fade.htm">FadeIn0 / FadeOut0 / FadeIn / FadeOut / FadeIn2 /
  FadeOut2 / FadeIO0 / FadeIO / FadeIO2</a></td>

<td WIDTH="70%">FadeIn and FadeOut cause the video stream to fade linearly
to black at the start or end.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/freezeframe.htm">FreezeFrame</a></td>

<td WIDTH="70%">The FreezeFrame filter replaces all the frames between
first-frame and last-frame with a selected frame.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/loop.htm">Loop</a></td>

<td WIDTH="70%">Loops the segment from start frame to end frame a given
number of times.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/select.htm">SelectEven / SelectOdd</a></td>

<td WIDTH="70%">SelectEven makes an output video stream using only the
even-numbered frames</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/selectevery.htm">SelectEvery</a></td>

<td WIDTH="70%">SelectEvery is a generalization of filters like SelectEven
and Pulldown.</td>
</tr>

<tr>
<td><a href="corefilters/selectrangeevery.htm">SelectRangeEvery</a></td>

<td>This filters selects a range of frames with a certain period.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/trim.htm">Trim</a></td>

<td WIDTH="70%">Trim trims a video clip so that it includes only the frames
first-frame through last-frame.</td>
</tr>
</table>

<h2>
<a NAME="interlaced"></a>Filters for treating interlaced video</h2>

<p>Currently (v2.5x and older versions), AviSynth has no interlaced flag which can be used for interlaced video. There is a fieldbased flag, but contrary to what you might expect, this flag is not related to interlaced video. In fact, all video (progressive or interlaced) is framebased, unless you use AviSynth filters to change that. There are two filters who turn framebased video into fieldbased video: SeparateFields and AssumeFieldBased. More information about fieldbased video can be found
<a href="http://www.avisynth.org/FieldbasedVideo"><cite>here</cite></a>.</p>

<table BORDER CELLSPACING=0 CELLPADDING=4 WIDTH="90%" style="" >
  <tbody></tbody>

  <tr>
    <td WIDTH="30%"><a href="corefilters/parity.htm">AssumeFrameBased
/ AssumeFieldBased<br>
      AssumeTFF / AssumeBFF<br>
      ComplementParity
      </a></td>
    <td WIDTH="70%">Avisynth keeps track of whether a given clip is field-based
or frame-based...<br>
      Force field order.
<br>
      ComplementParity changes top fields to bottom fields and vice-versa.
          </td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/bob.htm">Bob</a></td>
    <td WIDTH="70%">Bob takes a clip and bob-deinterlaces it</td>
  </tr>



  <tr>
    <td WIDTH="30%"><a href="corefilters/doubleweave.htm">DoubleWeave</a></td>
    <td WIDTH="70%">The DoubleWeave filter operates like Weave, except that it
	produces double the number of frames by combining both the odd and even pairs
	of fields.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/interleave.htm">Interleave</a></td>
    <td WIDTH="70%">Interleave interleaves frames from several clips on a frame-by-frame
basis.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/pulldown.htm">Pulldown</a></td>
    <td WIDTH="70%">The Pulldown filter simply selects two out of every five
frames of the source video.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/separatefields.htm">SeparateFields</a></td>
    <td WIDTH="70%">SeparateFields takes a frame-based clip and splits each
frame into its component top and bottom fields.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/swapfields.htm">SwapFields</a></td>
    <td WIDTH="70%">The SwapFields filter swaps the two fields in an interlaced
frame</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/weave.htm">Weave</a></td>
    <td WIDTH="70%">Weave takes even pairs of fields from a Fields Separated input
	video clip and combines them together to produce interlaced frames.</td>
  </tr>
</table>

<h2>
<a NAME="audio"></a>Audio filters</h2>
Prior to v2.5 the audio samples are converted to 16 bits when using one
of these audio filters.
<br>Starting from v2.5 the audio samples will be automatically converted
if any filters requires a special type of sample. This means that most
filters will accept several types of input, but if a filter doesn't support
the type of sample it is given, it will automatically convert the samples
to something it supports.
<br>In general this shouldn't concern the average user. A specific sample
type can be forced by using the ConvertAudio functions.
<br>If the sample type is float, when AviSynth has to output the data,
it will be converted to 16 bit, since float cannot be passed as valid AVI
data.
<br>&nbsp;
<table BORDER="1" CELLSPACING=0 CELLPADDING=4 WIDTH="90%" >
<tbody></tbody>

<tr>
<td WIDTH="30%"><a href="corefilters/amplify.htm">Amplify / AmplifydB</a></td>

<td WIDTH="70%">Amplify multiply audio samples by amount.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/assumerate.htm">AssumeSampleRate</a></td>

<td WIDTH="70%">Adjusts the playback speed of the audio.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/audiodub.htm">AudioDub / AudioDubEx</a></td>

<td WIDTH="70%">AudioDub takes the video stream from the first argument
and the audio stream from the second argument and combines them. AudioDubEx is
  similar, but it doesn't throw an exception if both clips don't have a video or
  audio stream.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/converttomono.htm">ConvertToMono</a></td>

<td WIDTH="70%">Merges all audio channels.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/convertaudio.htm">ConvertAudioTo8bit
/ ConvertAudioTo16bit / ConvertAudioTo24bit / ConvertAudioTo32bit / ConvertAudioToFloat</a></td>

<td WIDTH="70%">Converts audio samples to 8, 16, 24, 32 bits or float.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/delayaudio.htm">DelayAudio</a></td>

<td WIDTH="70%">DelayAudio delays the audio track by seconds seconds.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/ensuresync.htm">EnsureVBRMP3Sync</a></td>

<td WIDTH="70%">Corrects out-of-sync mp3-AVI's, when seeking ot trimming.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/getchannel.htm">GetChannel</a></td>

<td WIDTH="70%">Returns a channel from an audio signal.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/killaudio.htm">KillAudio</a></td>

<td WIDTH="70%">Removes the audio from a clip completely.</td>
</tr>

<tr>
<td><a href="corefilters/mergechannels.htm">MergeChannels</a></td>

<td>Merges channels of two or more audio clips.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/mixaudio.htm">MixAudio</a></td>

<td WIDTH="70%">Mixes audio from two clips.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/normalize.htm">Normalize</a></td>

<td WIDTH="70%">Amplifies the entire waveform as much as possible, without
clipping.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/resampleaudio.htm">ResampleAudio</a></td>

<td WIDTH="70%">Performs a change of the audio sample rate.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/ssrc.htm">SSRC</a></td>

<td WIDTH="70%">Performs a high-quality change of the audio sample rate. It uses
  SSRC by Naoki Shibata, which offers the best resample quality available.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/supereq.htm">SuperEQ</a></td>

<td WIDTH="70%">High quality 16 band sound equalizer.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/timestretch.htm">TimeStretch</a></td>

<td WIDTH="70%">This filter can change speed of the sound without changing the
  pitch, and change the pitch of a sound without changing the length of a sound.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/tone.htm">Tone</a></td>

<td WIDTH="70%">This will generate sound.</td>
</tr>
</table>

<h2>
<a NAME="special"></a>Special and exotic filters</h2>

<table BORDER="1" CELLSPACING=0 CELLPADDING=4 WIDTH="90%" >
  <caption></caption>
  <tbody></tbody>

  <tr>
    <td WIDTH="30%"><a href="corefilters/animate.htm">Animate / ApplyRange</a></td>
    <td WIDTH="70%">Animate (ApplyRange) is a meta-filter which evaluates its
parameter filter with continuously varying (the same) arguments.</td>
  </tr>

  <tr>
    <td><a href="corefilters/conditionalfilter.htm">ConditionalFilter / FrameEvaluate
/ ScriptClip</a> / <a href="corefilters/conditionalreader.htm">ConditionalReader</a></td>
    <td>ConditionalFilter returns source1 if some condition is met, otherwise
it returns source2. ScriptClip returns the clip which is returned by the
function evaluated on every frame.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/fixbrokenchromaupsampling.htm">FixBrokenChromaUpsampling</a></td>
    <td WIDTH="70%">I noticed that the MS DV codec upsamples the chroma channels
incorrectly, and I added a FixBrokenChromaUpsampling filter to compensate
for it.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/fixluminance.htm">FixLuminance</a></td>
    <td WIDTH="70%">Correct shifting vertical luma offset</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/flip.htm">FlipHorizontal / FlipVertical</a></td>
    <td WIDTH="70%">Flips the video upside-down or left-to-right</td>
  </tr>

  <tr>
    <td><a href="corefilters/imagewriter.htm">Imagewriter</a></td>
    <td>Writes frames as images to your hard disk.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/peculiar.htm">PeculiarBlend</a></td>
    <td WIDTH="70%">This filter blends each frame with the following frame
in a peculiar way.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/reverse.htm">Reverse</a></td>
    <td WIDTH="70%">This filter makes a clip play in reverse.</td>
  </tr>

  <tr>
    <td WIDTH="30%"><a href="corefilters/subtitle.htm">Subtitle</a></td>
    <td WIDTH="70%">The Subtitle filter adds a single line of anti-aliased
text to a range of frames.</td>
  </tr>
  <tr>
    <td><a href="corefilters/tcpdeliver.htm">TCPDeliver</a></td>
    <td>This filter will enable you to send clips over your network. You can connect several clients to the same machine.</td>
  </tr>

  <tr>
    <td><a href="corefilters/turn.htm">TurnLeft / TurnRight / Turn180</a></td>
    <td>Rotates the clip 90 degrees counterclock wise / 90 degrees clock wise / 180 degrees.</td>
  </tr>

  <tr>
    <td><a href="corefilters/write.htm">WriteFile / WriteFileIf / WriteFileStart / WriteFileEnd</a></td>
    <td>Output to a textfile.</td>
  </tr>
</table>

<h2>
<a NAME="debug"></a>Debug filters</h2>

<table BORDER CELLSPACING=0 CELLPADDING=4 WIDTH="90%" style="" >
<caption></caption>
<tbody></tbody>

<tr>
<td WIDTH="30%"><a href="corefilters/colorbars.htm">ColorBars</a></td>

<td WIDTH="70%">The ColorBars filter produces a video clip containing SMPTE
color bars scaled to any image size.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/compare.htm">Compare</a></td>

<td WIDTH="70%">Compares two clips and prints out information about the
differences.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/Histogram.htm">Histogram</a></td>

<td WIDTH="70%">Adds a Histogram.</td>
</tr>

<tr>
<td><a href="corefilters/info.htm">Info</a></td>

<td>Prints out image and sound information.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/message.htm">MessageClip</a></td>

<td WIDTH="70%">MessageClip produces a clip containing a text message</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/showfive.htm">ShowFiveVersions</a></td>

<td WIDTH="70%">ShowFiveVersions takes five video streams and combines
them in a staggered arrangement from left to right.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/showframes.htm">ShowFrameNumber / ShowSMPTE</a></td>

<td WIDTH="70%">ShowFrameNumber draws text on every frame indicating what
number Avisynth thinks it is.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/stack.htm">StackHorizontal / StackVertical</a></td>

<td WIDTH="70%">StackHorizontal takes two or more video clips and displays
them together in left-to-right order.</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/subtract.htm">Subtract</a></td>

<td WIDTH="70%">Subtract produces an output clip in which every pixel is
set according to the difference between the corresponding pixels</td>
</tr>

<tr>
<td WIDTH="30%"><a href="corefilters/version.htm">Version</a></td>

<td WIDTH="70%">The Version filter generates a video clip with a short
version and copyright statement</td>
</tr>
</table>

<br><kbd>$Date: 2005/10/03 16:49:04 $</kbd>
</body>
</html>
